#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
void my_memcpy(void* dest,const void* src,size_t num)
{
	if (dest < src)
	{
		while (num--)
		{
			*(char*)dest = *(char*)src;
			dest = (char*)dest + 1;
			src = (char*)src + 1;
		}
	}
	else
	{
		while (num--)
		{
			*((char*)dest + num) = *((char*)src + num);
		}
	}
}
int main()
{
	int arr1[10] = { 1,2,3,4,5,6,7,8,9,0 };
	my_memcpy(arr1+2, arr1, 24);
	for (int i = 0; i < 10; i++)
	{
		printf("%d ", arr1[i]);
	}
	return 0;
}